import axios from 'axios'
const baseURL = 'http://43.138.15.137:7000/api/private/v1'
const token = localStorage.getItem('token')
export default () => ({
  methods: {
    async $httpGet(url, params = {}) {
      return await axios.get(baseURL + url, {
        params,
        headers: {
          'Authorization': token
        }
      })
    },
    async $httpPost(url, data = {}) {
      return await axios.post(baseURL + url, data, {
        headers: {
          'Authorization': token
        }
      })
    }

  }
})